package com.example.testvolication.service;

import com.example.testvolication.pojo.dto.GroupingDemo;
import com.example.testvolication.pojo.result.R;
import com.example.testvolication.pojo.valid.group.NameAndTypeGroup;
import com.example.testvolication.pojo.valid.group.NameGroup;
import com.example.testvolication.pojo.valid.group.TypeGroup;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>测试组校验在service成生效</p>
 */
public interface TestGroupService {

    /**
     * 测试group的入口
     * @param groupingDemo
     * @return
     */
    R testGrouping(GroupingDemo groupingDemo);

    /**
     * 测试group1在service层生效
     * @param groupingDemo
     */
    R testGrouping1(@Validated(NameGroup.class) GroupingDemo groupingDemo);

    /**
     * 测试group2在service层生效
     * @param groupingDemo
     */
    R testGrouping2(@Validated(TypeGroup.class) GroupingDemo groupingDemo);

    /**
     * 测试group3在service层生效
     * @param groupingDemo
     */
    R testGrouping3(@Validated(NameAndTypeGroup.class) GroupingDemo groupingDemo);
}
